import App from './App'

// #ifndef VUE3
import Vue from 'vue'
import './uni.promisify.adaptor'
import uvUI from '@/uni_modules/uv-ui-tools'

import store from '@/store/store'
import util from '@/common/util'
import config from '@/common/config'
import http from '@/common/http'
import api from '@/common/api'
import Mixin from '@/common/mixin'
Vue.use(uvUI)
Vue.mixin(Mixin)

Vue.config.productionTip = false
App.mpType = 'app'

Vue.prototype.$store = store
Vue.prototype.$util = util
Vue.prototype.$config = config
Vue.prototype.$http = http
Vue.prototype.$api = api

const app = new Vue({
  store,
  ...App,
})
app.$mount()
// #endif

// #ifdef VUE3
import { createSSRApp } from 'vue'
export function createApp() {
  const app = createSSRApp(App)
  return {
    app,
  }
}
// #endif
